<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j">
<head>
<title>#{bundle.paineleditar}</title>
<link type="text/css" href="#{facesContext.externalContext.requestContextPath}/style/style.css" 
	rel="stylesheet" />
<script type="text/javascript" 
	src="#{facesContext.externalContext.requestContextPath}/scripts/script.js">
</script>
</head>
<body>
	<f:view>
		<div id="accordion">
			<rich:modalPanel id="panelCurso" width="640" height="440">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="#{bundle.paineledicao}"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:outputLink value="#" id="hidelink">#{bundle.sair}</h:outputLink>
						<rich:componentControl for="panelCurso" attachTo="hidelink"
							operation="hide" event="onclick" />
					</h:panelGroup>
				</f:facet>
			<rich:tabPanel>
				<rich:tab label="#{bundle.paineleditacurso}">
					<div>
						<h:form id="cadcur">
							<h3>									
								<h:outputText id="nomeCur" value="#{bundle.painelnome}: #{eCursoBean.nome}" />
							</h3>
							#{bundle.painelch}<br />							
							<h:inputText required="true" id="chCur" value="#{eCursoBean.cargahoraria}">
								<f:validateLongRange minimum="1" />								
							</h:inputText>
							<rich:message for="chCur" style="color: blue;font-weight: bold;margin-left: 10px;" />
							<br />
							#{bundle.paineldesc}<br />
							<h:inputTextarea id="descCur" rows="12" cols="70"
								value="#{eCursoBean.descricao}" />
							<br />
							<br />
							<a4j:commandButton value="#{bundle.painelatualizar}" id="HideCur" 
								reRender="dtpancur"	action="#{eCursoBean.atualizar}" 
								oncomplete="windowclose('editacurso:cadcur:errorMsgsCur','panelCurso')">
							</a4j:commandButton>
							<a4j:outputPanel ajaxRendered="true">
                    			<h:messages id="errorMsgsCur" style="display:none"></h:messages>
               				</a4j:outputPanel>
						</h:form>
					</div>
				</rich:tab>
			</rich:tabPanel>
			</rich:modalPanel>
		</div>
	</f:view>
</body>
</html>